package com.easy.goods.controller;

import com.easy.bean.Products;
import com.easy.goods.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("goods/feign")
public class EasyFeignGoodsController {
    @Autowired
    ProductService productS;

    @RequestMapping(method = RequestMethod.GET, path = "/{id}")
    public Products getGoods(@PathVariable int id) {
       return productS.getProductByID(id);
    }
}
